home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / xulapp / nsIToolkitProfile.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  10KB  |  298 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIToolkitProfile.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIToolkitProfile_h__
  6. #define __gen_nsIToolkitProfile_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. class nsILocalFile; /* forward declaration */
  18.  
  19. class nsIToolkitProfile; /* forward declaration */
  20.  
  21. class nsIProfileUnlocker; /* forward declaration */
  22.  
  23.  
  24. /* starting interface:    nsIProfileLock */
  25. #define NS_IPROFILELOCK_IID_STR "50e07b0a-f338-4da3-bcdb-f4bb0db94dbe"
  26.  
  27. #define NS_IPROFILELOCK_IID \
  28.   {0x50e07b0a, 0xf338, 0x4da3, \
  29.     { 0xbc, 0xdb, 0xf4, 0xbb, 0x0d, 0xb9, 0x4d, 0xbe }}
  30.  
  31. /**
  32.  * Hold on to a profile lock. Once you release the last reference to this
  33.  * interface, the profile lock is released.
  34.  */
  35. class NS_NO_VTABLE nsIProfileLock : public nsISupports {
  36.  public: 
  37.  
  38.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPROFILELOCK_IID)
  39.  
  40.   /**
  41.      * The main profile directory.
  42.      */
  43.   /* readonly attribute nsILocalFile directory; */
  44.   NS_IMETHOD GetDirectory(nsILocalFile * *aDirectory) = 0;
  45.  
  46.   /**
  47.      * A directory corresponding to the main profile directory that exists for
  48.      * the purpose of storing data on the local filesystem, including cache
  49.      * files or other data files that may not represent critical user data.
  50.      * (e.g., this directory may not be included as part of a backup scheme.)
  51.      *
  52.      * In some cases, this directory may just be the main profile directory.
  53.      */
  54.   /* readonly attribute nsILocalFile localDirectory; */
  55.   NS_IMETHOD GetLocalDirectory(nsILocalFile * *aLocalDirectory) = 0;
  56.  
  57.   /**
  58.      * Unlock the profile.
  59.      */
  60.   /* void unlock (); */
  61.   NS_IMETHOD Unlock(void) = 0;
  62.  
  63. };
  64.  
  65. /* Use this macro when declaring classes that implement this interface. */
  66. #define NS_DECL_NSIPROFILELOCK \
  67.   NS_IMETHOD GetDirectory(nsILocalFile * *aDirectory); \
  68.   NS_IMETHOD GetLocalDirectory(nsILocalFile * *aLocalDirectory); \
  69.   NS_IMETHOD Unlock(void); 
  70.  
  71. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  72. #define NS_FORWARD_NSIPROFILELOCK(_to) \
  73.   NS_IMETHOD GetDirectory(nsILocalFile * *aDirectory) { return _to GetDirectory(aDirectory); } \
  74.   NS_IMETHOD GetLocalDirectory(nsILocalFile * *aLocalDirectory) { return _to GetLocalDirectory(aLocalDirectory); } \
  75.   NS_IMETHOD Unlock(void) { return _to Unlock(); } 
  76.  
  77. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  78. #define NS_FORWARD_SAFE_NSIPROFILELOCK(_to) \
  79.   NS_IMETHOD GetDirectory(nsILocalFile * *aDirectory) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDirectory(aDirectory); } \
  80.   NS_IMETHOD GetLocalDirectory(nsILocalFile * *aLocalDirectory) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLocalDirectory(aLocalDirectory); } \
  81.   NS_IMETHOD Unlock(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Unlock(); } 
  82.  
  83. #if 0
  84. /* Use the code below as a template for the implementation class for this interface. */
  85.  
  86. /* Header file */
  87. class nsProfileLock : public nsIProfileLock
  88. {
  89. public:
  90.   NS_DECL_ISUPPORTS
  91.   NS_DECL_NSIPROFILELOCK
  92.  
  93.   nsProfileLock();
  94.  
  95. private:
  96.   ~nsProfileLock();
  97.  
  98. protected:
  99.   /* additional members */
  100. };
  101.  
  102. /* Implementation file */
  103. NS_IMPL_ISUPPORTS1(nsProfileLock, nsIProfileLock)
  104.  
  105. nsProfileLock::nsProfileLock()
  106. {
  107.   /* member initializers and constructor code */
  108. }
  109.  
  110. nsProfileLock::~nsProfileLock()
  111. {
  112.   /* destructor code */
  113. }
  114.  
  115. /* readonly attribute nsILocalFile directory; */
  116. NS_IMETHODIMP nsProfileLock::GetDirectory(nsILocalFile * *aDirectory)
  117. {
  118.     return NS_ERROR_NOT_IMPLEMENTED;
  119. }
  120.  
  121. /* readonly attribute nsILocalFile localDirectory; */
  122. NS_IMETHODIMP nsProfileLock::GetLocalDirectory(nsILocalFile * *aLocalDirectory)
  123. {
  124.     return NS_ERROR_NOT_IMPLEMENTED;
  125. }
  126.  
  127. /* void unlock (); */
  128. NS_IMETHODIMP nsProfileLock::Unlock()
  129. {
  130.     return NS_ERROR_NOT_IMPLEMENTED;
  131. }
  132.  
  133. /* End of implementation class template. */
  134. #endif
  135.  
  136.  
  137. /* starting interface:    nsIToolkitProfile */
  138. #define NS_ITOOLKITPROFILE_IID_STR "7422b090-4a86-4407-972e-75468a625388"
  139.  
  140. #define NS_ITOOLKITPROFILE_IID \
  141.   {0x7422b090, 0x4a86, 0x4407, \
  142.     { 0x97, 0x2e, 0x75, 0x46, 0x8a, 0x62, 0x53, 0x88 }}
  143.  
  144. class NS_NO_VTABLE nsIToolkitProfile : public nsISupports {
  145.  public: 
  146.  
  147.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_ITOOLKITPROFILE_IID)
  148.  
  149.   /**
  150.  * A interface representing a profile.
  151.  * @note THIS INTERFACE SHOULD BE IMPLEMENTED BY THE TOOLKIT CODE ONLY! DON'T
  152.  *       EVEN THINK ABOUT IMPLEMENTING THIS IN JAVASCRIPT!
  153.  */
  154. /**
  155.      * The location of the profile directory.
  156.      */
  157.   /* readonly attribute nsILocalFile rootDir; */
  158.   NS_IMETHOD GetRootDir(nsILocalFile * *aRootDir) = 0;
  159.  
  160.   /**
  161.      * The location of the profile local directory, which may be the same as
  162.      * the root directory.  See nsIProfileLock::localDirectory.
  163.      */
  164.   /* readonly attribute nsILocalFile localDir; */
  165.   NS_IMETHOD GetLocalDir(nsILocalFile * *aLocalDir) = 0;
  166.  
  167.   /**
  168.      * The name of the profile.
  169.      */
  170.   /* attribute AUTF8String name; */
  171.   NS_IMETHOD GetName(nsACString & aName) = 0;
  172.   NS_IMETHOD SetName(const nsACString & aName) = 0;
  173.  
  174.   /**
  175.      * Removes the profile from the registry of profiles.
  176.      *
  177.      * @param removeFiles
  178.      *        Indicates whether or not the profile directory should be
  179.      *        removed in addition.
  180.      */
  181.   /* void remove (in boolean removeFiles); */
  182.   NS_IMETHOD Remove(PRBool removeFiles) = 0;
  183.  
  184.   /**
  185.      * Lock this profile using platform-specific locking methods.
  186.      *
  187.      * @param lockFile If locking fails, this may return a lockFile object
  188.      *                 which can be used in platform-specific ways to
  189.      *                 determine which process has the file locked. Null
  190.      *                 may be passed.
  191.      * @return An interface which holds a profile lock as long as you reference
  192.      *         it.
  193.      * @throws NS_ERROR_FILE_ACCESS_DENIED if the profile was already locked.
  194.      */
  195.   /* nsIProfileLock lock (out nsIProfileUnlocker aUnlocker); */
  196.   NS_IMETHOD Lock(nsIProfileUnlocker **aUnlocker, nsIProfileLock **_retval) = 0;
  197.  
  198. };
  199.  
  200. /* Use this macro when declaring classes that implement this interface. */
  201. #define NS_DECL_NSITOOLKITPROFILE \
  202.   NS_IMETHOD GetRootDir(nsILocalFile * *aRootDir); \
  203.   NS_IMETHOD GetLocalDir(nsILocalFile * *aLocalDir); \
  204.   NS_IMETHOD GetName(nsACString & aName); \
  205.   NS_IMETHOD SetName(const nsACString & aName); \
  206.   NS_IMETHOD Remove(PRBool removeFiles); \
  207.   NS_IMETHOD Lock(nsIProfileUnlocker **aUnlocker, nsIProfileLock **_retval); 
  208.  
  209. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  210. #define NS_FORWARD_NSITOOLKITPROFILE(_to) \
  211.   NS_IMETHOD GetRootDir(nsILocalFile * *aRootDir) { return _to GetRootDir(aRootDir); } \
  212.   NS_IMETHOD GetLocalDir(nsILocalFile * *aLocalDir) { return _to GetLocalDir(aLocalDir); } \
  213.   NS_IMETHOD GetName(nsACString & aName) { return _to GetName(aName); } \
  214.   NS_IMETHOD SetName(const nsACString & aName) { return _to SetName(aName); } \
  215.   NS_IMETHOD Remove(PRBool removeFiles) { return _to Remove(removeFiles); } \
  216.   NS_IMETHOD Lock(nsIProfileUnlocker **aUnlocker, nsIProfileLock **_retval) { return _to Lock(aUnlocker, _retval); } 
  217.  
  218. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  219. #define NS_FORWARD_SAFE_NSITOOLKITPROFILE(_to) \
  220.   NS_IMETHOD GetRootDir(nsILocalFile * *aRootDir) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRootDir(aRootDir); } \
  221.   NS_IMETHOD GetLocalDir(nsILocalFile * *aLocalDir) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLocalDir(aLocalDir); } \
  222.   NS_IMETHOD GetName(nsACString & aName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetName(aName); } \
  223.   NS_IMETHOD SetName(const nsACString & aName) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetName(aName); } \
  224.   NS_IMETHOD Remove(PRBool removeFiles) { return !_to ? NS_ERROR_NULL_POINTER : _to->Remove(removeFiles); } \
  225.   NS_IMETHOD Lock(nsIProfileUnlocker **aUnlocker, nsIProfileLock **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Lock(aUnlocker, _retval); } 
  226.  
  227. #if 0
  228. /* Use the code below as a template for the implementation class for this interface. */
  229.  
  230. /* Header file */
  231. class nsToolkitProfile : public nsIToolkitProfile
  232. {
  233. public:
  234.   NS_DECL_ISUPPORTS
  235.   NS_DECL_NSITOOLKITPROFILE
  236.  
  237.   nsToolkitProfile();
  238.  
  239. private:
  240.   ~nsToolkitProfile();
  241.  
  242. protected:
  243.   /* additional members */
  244. };
  245.  
  246. /* Implementation file */
  247. NS_IMPL_ISUPPORTS1(nsToolkitProfile, nsIToolkitProfile)
  248.  
  249. nsToolkitProfile::nsToolkitProfile()
  250. {
  251.   /* member initializers and constructor code */
  252. }
  253.  
  254. nsToolkitProfile::~nsToolkitProfile()
  255. {
  256.   /* destructor code */
  257. }
  258.  
  259. /* readonly attribute nsILocalFile rootDir; */
  260. NS_IMETHODIMP nsToolkitProfile::GetRootDir(nsILocalFile * *aRootDir)
  261. {
  262.     return NS_ERROR_NOT_IMPLEMENTED;
  263. }
  264.  
  265. /* readonly attribute nsILocalFile localDir; */
  266. NS_IMETHODIMP nsToolkitProfile::GetLocalDir(nsILocalFile * *aLocalDir)
  267. {
  268.     return NS_ERROR_NOT_IMPLEMENTED;
  269. }
  270.  
  271. /* attribute AUTF8String name; */
  272. NS_IMETHODIMP nsToolkitProfile::GetName(nsACString & aName)
  273. {
  274.     return NS_ERROR_NOT_IMPLEMENTED;
  275. }
  276. NS_IMETHODIMP nsToolkitProfile::SetName(const nsACString & aName)
  277. {
  278.     return NS_ERROR_NOT_IMPLEMENTED;
  279. }
  280.  
  281. /* void remove (in boolean removeFiles); */
  282. NS_IMETHODIMP nsToolkitProfile::Remove(PRBool removeFiles)
  283. {
  284.     return NS_ERROR_NOT_IMPLEMENTED;
  285. }
  286.  
  287. /* nsIProfileLock lock (out nsIProfileUnlocker aUnlocker); */
  288. NS_IMETHODIMP nsToolkitProfile::Lock(nsIProfileUnlocker **aUnlocker, nsIProfileLock **_retval)
  289. {
  290.     return NS_ERROR_NOT_IMPLEMENTED;
  291. }
  292.  
  293. /* End of implementation class template. */
  294. #endif
  295.  
  296.  
  297. #endif /* __gen_nsIToolkitProfile_h__ */
  298.